﻿namespace Pub.Class
{
    using System;
    using System.Runtime.CompilerServices;

    public static class BooleanExtensions
    {
        public static void Do(this bool iBool, Action actionTrue)
        {
            if (iBool)
            {
                actionTrue();
            }
        }

        public static void Do(this bool iBool, Action actionTrue, Action actionFalse)
        {
            if (iBool)
            {
                actionTrue();
            }
            else
            {
                actionFalse();
            }
        }

        public static bool False(this bool iBool)
        {
            return !iBool;
        }

        public static bool Not(this bool iBool)
        {
            return !iBool;
        }

        public static bool True(this bool iBool)
        {
            return iBool;
        }
    }
}

